import { createProdMockServer } from 'vite-plugin-mock/es/createProdMockServer';

const mockArrNew = import.meta.glob('./modules/*.js');

let mockApi = [];
Object.values(mockArrNew).forEach((el) => {
  mockApi = [...mockApi, ...el.default];
});

export const mockModules = [...mockApi];

export function setupProdMockServer() {
  createProdMockServer(mockModules);
}
